package com.whjfxx.terminal.utils;

import com.whjfxx.terminal.exceptions.BizException;

/**
 * Created by b.c on 2022/5/7 14:51
 */
public class MyUtil {

    /**
     * 校验更新结果
     * @param rest
     */
    public static void validUpdate(int rest) {
        validUpdate(rest, "更新失败");
    }

    /**
     * 校验更新结果
     * @param rest
     * @param msg
     */
    public static void validUpdate(int rest, String msg) {
        if (0 == rest) {
            throw BizException.build(msg);
        }
    }

}
